<?php

namespace app\mall\ui\table;

use suframe\thinkAdmin\ui\table\TableInterface;

/**
 * 商城广告表格
 */
class MallAdvTable extends TableInterface
{
    public function header()
    {
        return [
            'id' => ['label' => 'ID', 'sort' => true, 'fixed' => 'left', 'width' => 80],
            'title'=> ['label' => '广告标题'],
            'linkurl'=> ['label' => '链接地址'],
            'image'=> ['label' => '广告图片', 'type' => 'image'],
            'start_time'=> ['label' => '开始时间'],
            'end_time'=> ['label' => '结束时间'],
            'created_time'=> ['label' => '创建时间'],
            'hits'=> ['label' => '点击次数'],
            'pos_id'=> ['label' => '广告位id'],
            'inx'=> ['label' => '排序'],
        ];
    }

    public function filters()
    {
        return [
            'title' => ['label' => '广告标题', 'type' => 'text'],
            'end_time' => ['label' => '结束时间', 'type' => 'daterange'],
        ];
    }
}